<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script type="text/javascript">
    /*
     *自增自减练习
     */
    var n1=10,n2=20;
    var n=n1++;
    console.log('n='+n);
    console.log('n1='+n1);
    n=++n1;
    console.log('n='+n);
    console.log('n1='+n1);
    n=n2--;
    console.log('n='+n);
    console.log('n2='+n2);
    n=--n2;
    console.log('n='+n);
    console.log('n2='+n2);
    </script>
</head>
<body>
    
</body>
</html>